Segment $XY$ is parallel to side $AC$ and divides equilateral triangle $ABC$ such that the ratio of the areas of equilateral triangles $XBY$ and $ABC$ is $1:4.$ If $AC = 6$ units, what is the length of segment $XY$, in units? [asy] size(100); pair A,B,C,X,Y; A=(0,0); B=(1,sqrt(3)); C=(2,0); X=midpoint(A--B); Y=midpoint(B--C); draw(A--B--C--cycle); draw(X--Y); label("$A$",A,SW); label("$B$",B,N); label("$C$",C,SE); label("$X$",X,W); label("$Y$",Y,E); [/asy]
If two triangles are similar, their corresponding sides are in the ratio $a:b$, and their areas are in the ratio $a^2:b^2$. $\triangle XBY$ and $\triangle ABC$ are both equilateral and thus are similar by AAA. If their area ratio is $\frac{1}{4}$, then the ratio of their corresponding side lengths is the square root of the area ratio: $\sqrt{\frac{1}{4}}=\frac{1}{2}$. We then have the ratio $\frac{XY}{AC}=\frac{1}{2}$. Since we are given that $AC=6$, then $\frac{XY}{6}=\frac{1}{2}$, so $XY=\boxed{3}\text{ units}$.